package com.github.io.entity;

import com.github.io.utils.TreeModel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2022/7/28 14:13
 * Description:
 */

@Data
@Accessors(chain = true)
public class Menu implements TreeModel<Menu> {
    
    private String id;
    private String pid;
    
    private String remark;
    private String content;
    private List<Menu> children;
    
    @Override
    public String getId() {
        return this.id;
    }

    @Override
    public String getPid() {
        return this.pid;
    }
    
    
    @Override
    public Menu setChildren(List<Menu> menus){
        this.children = menus;
        return this;
    }

    public Menu(String id, String pid, String content) {
        this.id = id;
        this.pid = pid;
        this.content = content;
    }
}
